require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 2,["7"] = 2,["8"] = 5,["9"] = 5,["10"] = 5,["12"] = 9,["13"] = 10,["14"] = 11,["15"] = 12,["16"] = 11,["17"] = 14,["18"] = 15,["19"] = 16,["20"] = 17,["21"] = 16,["22"] = 19,["23"] = 20,["24"] = 21,["25"] = 22,["26"] = 21,["27"] = 24,["28"] = 25,["29"] = 26,["30"] = 27,["31"] = 26,["32"] = 8,["33"] = 32,["34"] = 33,["35"] = 33,["36"] = 33,["37"] = 33,["40"] = 36,["41"] = 37,["42"] = 38,["44"] = 40,["45"] = 41,["46"] = 42,["47"] = 43,["48"] = 43,["49"] = 43,["50"] = 43,["52"] = 32,["53"] = 5});
local ____exports = {}
local ____trigger = require("solar.w3ts.handles.trigger")
local Trigger = ____trigger.Trigger
local ____DataBase = require("solar.common.DataBase")
local DataBase = ____DataBase.default
____exports.default = __TS__Class()
local FailState = ____exports.default
FailState.name = "FailState"
function FailState.prototype.____constructor(self)
    local trigger1 = __TS__New(Trigger)
    trigger1:registerEnterRect(gg_rct_p1_sb_12)
    trigger1:addAction(function()
        self:action(0)
    end)
    local trigger2 = __TS__New(Trigger)
    trigger2:registerEnterRect(gg_rct_p2_sb_12)
    trigger2:addAction(function()
        self:action(1)
    end)
    local trigger3 = __TS__New(Trigger)
    trigger3:registerEnterRect(gg_rct_p3_sb_12)
    trigger3:addAction(function()
        self:action(2)
    end)
    local trigger4 = __TS__New(Trigger)
    trigger4:registerEnterRect(gg_rct_p4_sb_12)
    trigger4:addAction(function()
        self:action(3)
    end)
end
function FailState.prototype.action(self, index)
    if not IsUnitEnemy(
        GetTriggerUnit(),
        Player(0)
    ) then
        return
    end
    local solarData = DataBase:getPlayerSolarData(Player(index))
    if not solarData.FailState_LouGuai_Count then
        solarData.FailState_LouGuai_Count = 0
    end
    solarData.FailState_LouGuai_Count = solarData.FailState_LouGuai_Count + 1
    ExplodeUnitBJ(GetTriggerUnit())
    if solarData.FailState_LouGuai_Count > 30 then
        CustomDefeatBJ(
            Player(index),
            "失败了！"
        )
    end
end
____exports.default = FailState
return ____exports
